The present invention relates to a control system that includes a personal computer.
German Laid-Open publication DE 38 08 135 discloses a control system including a personal computer (PC). The PC includes a PC-processor, a data memory, a freely programmable memory for a user program, and a communications processor. These individual components are connected to one another via a PC bus, which has address lines, data lines and control lines. The communications processor is designed as a module, which is plugged into one of the PC slots. In addition to the communications processor, which can independently transmit cyclic data to a field bus, a stored programmable control unit (SPC) is realized on the plug-in module. Therein, the circuit is arranged in such a way that a program for controlling a process is executed either by the PC processor or by a processor of the SPC. This process is controlled via sensors and/or actuators that are connected to the field bus.
A first operating mode of the control system, in which the control program runs on the PC processor, has the advantage that the processing of information and the control of the process are not dependent on a specific SPC language, such as a xe2x80x9ccoupling planxe2x80x9d (COP) or xe2x80x9cinstruction listxe2x80x9d (IL). Instead, the control program is written in any standard language, such as PASCAL, C, or BASIC. The system is therefore more user friendly and additional applications of the control system are made available. It is, however, a downside of this first operating mode that the control program and the polling of data received on the field bus increase the load on the PC processor. Since the PC processor is required to perform other tasks, such as keyboard queries, display functions, process data analysis and process data visualization, the available resources are inevitably overloaded. Specifically, the PC processor load is significantly increased if the control system controls a time critical process during which the process data must be read in very short time intervals in order to detect time critical changes in the process.
A second operating mode of the control system, in which an SPC runs the control program independently of the PC processor, has the advantage that the SPS processor is not burdened by any additional tasks. Instead, the SPC processor is provided for control tasks only. By the same token, the PC processor does not have to perform these control tasks. However, it is a drawback of this second operating mode that the control program must be written in a specific programming language tailored to stored programmable controls.
It is one object of the present invention to provide a control system including a personal computer (PC), in which the PC processor assumes the task of running the control program, yet wherein the PC processor is burdened by this control task to a lesser extent than previously achieved in the prior art.
This and other objects of the present invention are achieved by a control system to control a process, wherein the control system includes a field bus, a personal computer, and a monitoring unit. The field bus is coupled to sensors and actuators and receives process data from the process to be controlled. The personal computer executes a control program for controlling the process and includes a personal computer processor, a data memory, a program memory, and a communications processor. The communications processor is coupled to the field bus and performs independently a cyclic transmission of the process data on the field bus. The monitoring unit monitors the process data received at the field bus and/or the cyclic transmission of the process data on the field bus. In addition, the monitoring unit causes the personal computer processor to run the control program in order to process the process data received at the field bus, if at least one predetermined condition is met.
It is an advantage of the present invention that control programs written for a control system operating in the first operating mode, in which the control programs are executed on the PC processor, can be transferred onto the new control system without any major changes. Therein, the PC processor is relieved from polling received process data or from monitoring a field bus cycle. These tasks are advantageously assumed by the monitoring unit. The monitoring unit can be advantageously realized by a parameter-driven hardware circuit. Alternatively, a software solution is possible by enhancing a program of the communications processor accordingly.
In any case, a fast detection of events, e.g., changes of the process data, is achieved. The control program is activated only if the process data have actually changed. Advantageously, specific conditions are predetermined for each subscriber connected to the field bus, e.g., a sensor or an actuator. The monitoring unit checks whether these conditions are met. Therefore, the control method according to the present invention allows for a flexible classification of the subscribers. In addition, the load on the PC processor is scaleable. The overall load on the PC processor is reduced so that the PC processor is more frequently available for other applications. Thereby, the control system reacts to changing process data with a minimal time delay, which is an important functional requirement for the control system.
If the monitoring unit causes the PC processor to generate an interrupt command in order to process received data, a standard technique is advantageously used to activate the control program with a minimal time delay.
If a predetermined cycle event occurs, the processing of received data in the control program is advantageously synchronized with the field bus cycle. This cycle event represents a predetermined condition, which is to be met while the cyclical data transmission on the field bus is monitored. This concept is especially advantageous if the predetermined cycle event is xe2x80x9cthe completion of a cyclexe2x80x9d, or if a constant scanning time is desired in case a scanning control is used.
If the monitoring unit monitors whether or not a message regarding errors in the subscribers of the control system has been received, a fast reaction to these errors is achieved. As noted above, the subscribers are connected to the field bus.
Furthermore, the received process data can be checked in order to determine whether they exceed a predefined value range. Thereby, the PC processor can quickly initiate appropriate measures.
If the communications processor stores the received process data in a memory that can be accessed by the PC processor, a current representation of the process is constantly available in order to run the control program and in order to perform visualization tasks. The memory can be designed in such a way that the stored data are accessed by both the PC processor and the communications processor. This approach has the advantage that the communications processor can handle the field bus cycle independently of the PC processor""s retrievals of process data. The duration of the field bus cycle is therefore not influenced by the number of the PC processor""s data retrievals.
Advantageously, the control program causes the PC processor to process the data received at the field bus only if the process data have changed. The monitoring unit indicates such a change in the process data, if the received process data deviate from the process data stored in the memory. This is especially advantageous in processes which exhibit low dynamics, since an unnecessary load of the PC processor is thus avoided.
The new control system is especially advantageous if the communications processor is operated as a xe2x80x9cmasterxe2x80x9d, which is connected to a field bus of the PROFIBUS DP type. Such a field bus is designed for cyclical data transmission. The communications processor, which operates as the master, determines the field bus cycle and functions as a xe2x80x9cclock providerxe2x80x9d for detecting the process data. The duration of a field bus cycle, which corresponds to the scanning period during regulation, is independent of other subscribers, which are connected to the field bus and operated as xe2x80x9cslavesxe2x80x9d.